<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>阿里开源JetCache分布式缓存框架 - 技术小馆</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', 'Noto Serif SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
            background-color: #f8fafc;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
        }
        .gradient-text {
            background: linear-gradient(90deg, #2563eb, #1e40af);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        .card-hover {
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        }
        .highlight-code {
            background: #f3f4f6;
            border-left: 4px solid #2563eb;
            color: #1f2937;
        }
        .section-divider {
            border-bottom: 1px solid #e5e7eb;
            margin: 3rem 0;
        }
        .first-letter {
            font-size: 3.5em;
            float: left;
            line-height: 0.8;
            margin-right: 0.1em;
            color: #2563eb;
            font-weight: 700;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <div class="hero-gradient text-white py-20 px-4 sm:px-6 lg:px-8">
        <div class="max-w-7xl mx-auto">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-1/2 mb-10 md:mb-0">
                    <h1 class="text-4xl md:text-5xl font-bold mb-6 leading-tight">
                        阿里开源<span class="gradient-text">JetCache</span>分布式缓存框架
                    </h1>
                    <p class="text-xl mb-8 opacity-90">
                        在高并发、大数据时代，JetCache为企业级应用提供高性能、易用的缓存解决方案
                    </p>
                    <div class="flex items-center space-x-4">
                        <div class="bg-blue-600 px-4 py-2 rounded-full text-sm font-medium">
                            <i class="fas fa-rocket mr-2"></i>高性能
                        </div>
                        <div class="bg-blue-600 px-4 py-2 rounded-full text-sm font-medium">
                            <i class="fas fa-shield-alt mr-2"></i>高可靠
                        </div>
                        <div class="bg-blue-600 px-4 py-2 rounded-full text-sm font-medium">
                            <i class="fas fa-cogs mr-2"></i>易集成
                        </div>
                    </div>
                </div>
                <div class="md:w-1/2 flex justify-center">
                    <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1753511278019-315c0fd3-5aaf-46b3-8c5f-1d0945573245.png" 
                         alt="JetCache架构图" 
                         class="rounded-lg shadow-2xl w-full max-w-md border-4 border-white">
                </div>
            </div>
        </div>
    </div>

    <!-- Main Content -->
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
        <!-- Introduction -->
        <div class="mb-16">
            <p class="text-lg text-gray-700 leading-relaxed mb-6">
                <span class="first-letter">在</span>当今高并发、大数据时代，缓存已成为提升系统性能的关键技术。传统的单机缓存已无法满足分布式系统的需求，而Redis等分布式缓存虽然强大，但在使用过程中仍存在诸多痛点：缓存穿透、缓存雪崩、缓存击穿等问题频发，手动管理缓存的生命周期更是让开发者头疼不已。
            </p>
            <p class="text-lg text-gray-700 leading-relaxed">
                阿里巴巴开源的JetCache框架正是为解决这些问题而生。它不仅提供了统一的缓存抽象层，还内置了丰富的缓存策略和自动管理机制。无论是本地缓存还是分布式缓存，JetCache都能提供一致的使用体验，让开发者专注于业务逻辑，而将复杂的缓存管理交给框架处理。
            </p>
        </div>

        <!-- Section 1 -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="h-0.5 bg-blue-500 w-16 mr-4"></div>
                <h2 class="text-3xl font-bold text-gray-800">一、JetCache框架概述</h2>
            </div>

            <!-- Subsection 1.1 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">1</span>
                    什么是JetCache
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 mb-6 card-hover">
                    <p class="text-gray-700 mb-4">JetCache是阿里巴巴开源的一个基于Java的缓存框架，它提供了统一的缓存抽象层，支持本地缓存和远程缓存。JetCache的设计理念是"让缓存使用更简单"，通过注解驱动的方式，让开发者能够轻松地在方法上添加缓存功能。</p>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mt-6">
                        <div class="bg-blue-50 p-4 rounded-lg">
                            <h4 class="font-bold text-blue-800 mb-2 flex items-center">
                                <i class="fas fa-check-circle mr-2 text-blue-600"></i>主要特点
                            </h4>
                            <ul class="list-disc pl-5 text-gray-700 space-y-1">
                                <li>支持本地缓存和远程缓存</li>
                                <li>提供统一的缓存API</li>
                                <li>支持缓存穿透、缓存雪崩等问题的自动防护</li>
                                <li>支持缓存监控和统计</li>
                                <li>与Spring框架无缝集成</li>
                            </ul>
                        </div>
                        <div class="bg-green-50 p-4 rounded-lg">
                            <h4 class="font-bold text-green-800 mb-2 flex items-center">
                                <i class="fas fa-star mr-2 text-green-600"></i>适用场景
                            </h4>
                            <ul class="list-disc pl-5 text-gray-700 space-y-1">
                                <li>高并发Web应用</li>
                                <li>微服务架构</li>
                                <li>大数据量查询优化</li>
                                <li>需要多层次缓存的系统</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Subsection 1.2 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">2</span>
                    JetCache的核心特性
                </h3>
                <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                    <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                        <div class="text-blue-600 text-3xl mb-4">
                            <i class="fas fa-layer-group"></i>
                        </div>
                        <h4 class="font-bold text-lg mb-2">统一的缓存抽象</h4>
                        <p class="text-gray-700">JetCache提供了统一的缓存接口，无论是本地缓存还是远程缓存，都使用相同的API。</p>
                    </div>
                    <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                        <div class="text-green-600 text-3xl mb-4">
                            <i class="fas fa-tags"></i>
                        </div>
                        <h4 class="font-bold text-lg mb-2">注解驱动</h4>
                        <p class="text-gray-700">通过`@Cached`、`@CacheUpdate`、`@CacheInvalidate`等注解，可以轻松地在方法上添加缓存功能。</p>
                    </div>
                    <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                        <div class="text-purple-600 text-3xl mb-4">
                            <i class="fas fa-shield-alt"></i>
                        </div>
                        <h4 class="font-bold text-lg mb-2">自动防护机制</h4>
                        <p class="text-gray-700">内置了缓存穿透、缓存雪崩等问题的自动防护机制，提高了系统的稳定性。</p>
                    </div>
                </div>
            </div>

            <!-- Subsection 1.3 -->
            <div>
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">3</span>
                    与其他缓存框架的对比
                </h3>
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="overflow-x-auto">
                        <table class="min-w-full divide-y divide-gray-200">
                            <thead class="bg-gray-50">
                                <tr>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">特性</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">JetCache</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Spring Cache</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Caffeine</th>
                                </tr>
                            </thead>
                            <tbody class="bg-white divide-y divide-gray-200">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">远程缓存支持</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-check text-green-500"></i></td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-times text-red-500"></i></td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-times text-red-500"></i></td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">自动防护机制</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-check text-green-500"></i></td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-times text-red-500"></i></td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-times text-red-500"></i></td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">注解驱动</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-check text-green-500"></i></td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-check text-green-500"></i></td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-times text-red-500"></i></td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">多级缓存</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-check text-green-500"></i></td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-times text-red-500"></i></td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-times text-red-500"></i></td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">监控统计</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-check text-green-500"></i></td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-times text-red-500"></i></td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><i class="fas fa-times text-red-500"></i></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </section>

        <!-- Section 2 -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="h-0.5 bg-blue-500 w-16 mr-4"></div>
                <h2 class="text-3xl font-bold text-gray-800">二、JetCache架构设计</h2>
            </div>

            <!-- Subsection 2.1 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">1</span>
                    整体架构分析
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 mb-6 card-hover">
                    <div class="mermaid">
                        graph TD
                            A[应用层] --> B[注解驱动层]
                            A --> C[缓存抽象层]
                            A --> D[缓存实现层]
                            B -->|@Cached, @CacheUpdate, @CacheInvalidate| C
                            C -->|Cache接口| D
                            D --> E[本地缓存]
                            D --> F[远程缓存]
                    </div>
                    <div class="mt-6">
                        <h4 class="font-bold text-lg mb-3 text-gray-800">架构层次说明</h4>
                        <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                            <div class="bg-blue-50 p-4 rounded-lg">
                                <h5 class="font-semibold text-blue-800 mb-1">注解驱动层</h5>
                                <p class="text-sm text-gray-700">提供`@Cached`、`@CacheUpdate`、`@CacheInvalidate`等注解，用于在方法上添加缓存功能。</p>
                            </div>
                            <div class="bg-green-50 p-4 rounded-lg">
                                <h5 class="font-semibold text-green-800 mb-1">缓存抽象层</h5>
                                <p class="text-sm text-gray-700">定义统一的缓存接口，包括`get`、`put`、`remove`等基本操作。</p>
                            </div>
                            <div class="bg-purple-50 p-4 rounded-lg">
                                <h5 class="font-semibold text-purple-800 mb-1">缓存实现层</h5>
                                <p class="text-sm text-gray-700">提供具体的缓存实现，包括本地缓存（如Caffeine）和远程缓存（如Redis）。</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Subsection 2.2 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">2</span>
                    缓存抽象层设计
                </h3>
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <p class="text-gray-700 mb-4">JetCache的缓存抽象层设计非常简洁，主要包含以下几个核心接口：</p>
                        <div class="highlight-code p-4 rounded-lg mb-4">
                            <pre class="text-sm"><code>public interface Cache {
    // 获取缓存值
    Object get(Object key);
    
    // 设置缓存值
    void put(Object key, Object value);
    
    // 删除缓存
    void remove(Object key);
    
    // 清空缓存
    void clear();
}</code></pre>
                        </div>
                        <p class="text-gray-700">这种设计使得JetCache可以轻松地支持不同的缓存实现，同时保持API的一致性。</p>
                    </div>
                </div>
            </div>

            <!-- Subsection 2.3 -->
            <div>
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">3</span>
                    本地缓存与远程缓存
                </h3>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                    <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-100 p-2 rounded-full mr-3">
                                <i class="fas fa-laptop-code text-blue-600"></i>
                            </div>
                            <h4 class="font-bold text-lg">本地缓存</h4>
                        </div>
                        <p class="text-gray-700 mb-4">数据存储在应用进程的内存中，访问速度极快，但容量有限，且无法在多个应用实例间共享。</p>
                        <div class="bg-blue-50 p-3 rounded-lg">
                            <p class="text-sm text-blue-800 font-medium">适用场景：</p>
                            <ul class="list-disc pl-5 text-gray-700 text-sm mt-1">
                                <li>高频访问的只读数据</li>
                                <li>小型数据集的快速访问</li>
                                <li>作为多级缓存的第一层</li>
                            </ul>
                        </div>
                    </div>
                    <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                        <div class="flex items-center mb-4">
                            <div class="bg-green-100 p-2 rounded-full mr-3">
                                <i class="fas fa-server text-green-600"></i>
                            </div>
                            <h4 class="font-bold text-lg">远程缓存</h4>
                        </div>
                        <p class="text-gray-700 mb-4">数据存储在独立的缓存服务器中（如Redis），容量大，可以在多个应用实例间共享，但访问速度相对较慢。</p>
                        <div class="bg-green-50 p-3 rounded-lg">
                            <p class="text-sm text-green-800 font-medium">适用场景：</p>
                            <ul class="list-disc pl-5 text-gray-700 text-sm mt-1">
                                <li>分布式系统间共享数据</li>
                                <li>大规模数据集的缓存</li>
                                <li>需要持久化的缓存数据</li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="mt-8 bg-white rounded-xl shadow-md p-6 card-hover">
                    <div class="flex items-center mb-4">
                        <div class="bg-purple-100 p-2 rounded-full mr-3">
                            <i class="fas fa-sitemap text-purple-600"></i>
                        </div>
                        <h4 class="font-bold text-lg">多级缓存架构</h4>
                    </div>
                    <p class="text-gray-700">JetCache支持将本地缓存和远程缓存组合使用，形成多级缓存架构，既保证了访问速度，又提高了缓存命中率。</p>
                    <div class="mt-4 mermaid">
                        graph LR
                            A[应用] --> B[本地缓存]
                            A --> C[远程缓存]
                            B -->|缓存未命中| C
                            C -->|缓存未命中| D[数据库]
                    </div>
                </div>
            </div>
        </section>

        <!-- Section 3 -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="h-0.5 bg-blue-500 w-16 mr-4"></div>
                <h2 class="text-3xl font-bold text-gray-800">三、核心功能详解</h2>
            </div>

            <!-- Subsection 3.1 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">1</span>
                    注解驱动的缓存操作
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                    <div class="highlight-code p-4 rounded-lg mb-6">
                        <pre class="text-sm"><code>@Service
public class UserService {
    
    @Cached(name = "user:", key = "#userId", expire = 3600)
    public User getUserById(Long userId) {
        // 从数据库查询用户信息
        return userRepository.findById(userId);
    }
    
    @CacheUpdate(name = "user:", key = "#user.id", value = "#user")
    public void updateUser(User user) {
        // 更新用户信息
        userRepository.save(user);
    }
    
    @CacheInvalidate(name = "user:", key = "#userId")
    public void deleteUser(Long userId) {
        // 删除用户
        userRepository.deleteById(userId);
    }
}</code></pre>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                        <div class="bg-blue-50 p-4 rounded-lg">
                            <h4 class="font-bold text-blue-800 mb-2">@Cached注解</h4>
                            <p class="text-sm text-gray-700">用于缓存方法返回值，支持设置缓存名称、键值、过期时间等参数。</p>
                        </div>
                        <div class="bg-green-50 p-4 rounded-lg">
                            <h4 class="font-bold text-green-800 mb-2">@CacheUpdate注解</h4>
                            <p class="text-sm text-gray-700">用于更新缓存，当方法执行完成后，会自动更新对应的缓存值。</p>
                        </div>
                        <div class="bg-purple-50 p-4 rounded-lg">
                            <h4 class="font-bold text-purple-800 mb-2">@CacheInvalidate注解</h4>
                            <p class="text-sm text-gray-700">用于删除缓存，当方法执行完成后，会自动删除对应的缓存。</p>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Subsection 3.2 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">2</span>
                    缓存策略配置
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                    <div class="highlight-code p-4 rounded-lg mb-4">
                        <pre class="text-sm"><code>jetcache:
  statIntervalMinutes: 15
  areaInCacheName: false
  hidePackages: com.alibaba.jetcache
  local:
    default:
      type: caffeine
      keyConvertor: fastjson
      valueEncoder: java
      valueDecoder: java
      limit: 100
      expireAfterWriteInMillis: 100000
  remote:
    default:
      type: redis.lettuce
      keyConvertor: fastjson
      valueEncoder: java
      valueDecoder: java
      poolConfig:
        minIdle: 5
        maxIdle: 20
        maxTotal: 50
      host: ${redis.host:127.0.0.1}
      port: ${redis.port:6379}
      database: ${redis.database:0}</code></pre>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mt-6">
                        <div>
                            <h4 class="font-bold text-gray-800 mb-2">本地缓存配置</h4>
                            <ul class="list-disc pl-5 text-gray-700 space-y-1">
                                <li><span class="font-medium">type:</span> 指定缓存实现（如Caffeine）</li>
                                <li><span class="font-medium">limit:</span> 限制缓存条目数量</li>
                                <li><span class="font-medium">expireAfterWriteInMillis:</span> 写入后过期时间</li>
                                <li><span class="font-medium">keyConvertor:</span> 键转换器</li>
                            </ul>
                        </div>
                        <div>
                            <h4 class="font-bold text-gray-800 mb-2">远程缓存配置</h4>
                            <ul class="list-disc pl-5 text-gray-700 space-y-1">
                                <li><span class="font-medium">type:</span> 指定缓存实现（如Redis）</li>
                                <li><span class="font-medium">poolConfig:</span> 连接池配置</li>
                                <li><span class="font-medium">host/port:</span> Redis服务器地址</li>
                                <li><span class="font-medium">database:</span> Redis数据库索引</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Subsection 3.3 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">3</span>
                    缓存穿透防护
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                    <div class="highlight-code p-4 rounded-lg mb-6">
                        <pre class="text-sm"><code>@Cached(name = "user:", key = "#userId", expire = 3600, 
        cacheType = CacheType.REMOTE, cacheNullValue = true)
public User getUserById(Long userId) {
    // 如果用户不存在，返回null，JetCache会自动缓存null值
    return userRepository.findById(userId);
}</code></pre>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                        <div class="bg-blue-50 p-4 rounded-lg">
                            <h4 class="font-bold text-blue-800 mb-2">缓存穿透问题</h4>
                            <p class="text-sm text-gray-700">大量请求查询不存在的数据，导致请求直接打到数据库，造成数据库压力过大。</p>
                        </div>
                        <div class="bg-green-50 p-4 rounded-lg">
                            <h4 class="font-bold text-green-800 mb-2">JetCache解决方案</h4>
                            <p class="text-sm text-gray-700">通过设置`cacheNullValue = true`，当查询结果为null时，JetCache会缓存这个null值。</p>
                        </div>
                        <div class="bg-purple-50 p-4 rounded-lg">
                            <h4 class="font-bold text-purple-800 mb-2">防护效果</h4>
                            <p class="text-sm text-gray-700">后续相同请求会直接返回缓存的null值，避免了重复查询数据库。</p>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Subsection 3.4 -->
            <div>
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">4</span>
                    缓存雪崩解决方案
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                    <div class="highlight-code p-4 rounded-lg mb-6">
                        <pre class="text-sm"><code>@Cached(name = "user:", key = "#userId", expire = 3600, 
        localExpire = 1800, cacheType = CacheType.BOTH)
public User getUserById(Long userId) {
    return userRepository.findById(userId);
}</code></pre>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                        <div class="bg-blue-50 p-4 rounded-lg">
                            <h4 class="font-bold text-blue-800 mb-2">缓存雪崩问题</h4>
                            <p class="text-sm text-gray-700">大量缓存在同一时间失效，导致所有请求都打到数据库，造成数据库压力激增。</p>
                        </div>
                        <div class="bg-green-50 p-4 rounded-lg">
                            <h4 class="font-bold text-green-800 mb-2">JetCache解决方案</h4>
                            <p class="text-sm text-gray-700">通过设置`localExpire`参数，本地缓存的过期时间会比远程缓存短，形成时间差。</p>
                        </div>
                        <div class="bg-purple-50 p-4 rounded-lg">
                            <h4 class="font-bold text-purple-800 mb-2">防护效果</h4>
                            <p class="text-sm text-gray-700">当远程缓存失效时，本地缓存可能还未失效，可以继续提供服务，避免所有请求同时访问数据库。</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Section 4 -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="h-0.5 bg-blue-500 w-16 mr-4"></div>
                <h2 class="text-3xl font-bold text-gray-800">四、实战应用案例</h2>
            </div>

            <!-- Subsection 4.1 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">1</span>
                    Spring Boot集成JetCache
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                        <div>
                            <h4 class="font-bold text-gray-800 mb-3">添加依赖</h4>
                            <div class="highlight-code p-4 rounded-lg">
                                <pre class="text-sm"><code>&lt;dependency&gt;
    &lt;groupId&gt;com.alicp.jetcache&lt;/groupId&gt;
    &lt;artifactId&gt;jetcache-starter-redis&lt;/artifactId&gt;
    &lt;version&gt;2.7.3&lt;/version&gt;
&lt;/dependency&gt;</code></pre>
                            </div>
                        </div>
                        <div>
                            <h4 class="font-bold text-gray-800 mb-3">配置JetCache</h4>
                            <div class="highlight-code p-4 rounded-lg">
                                <pre class="text-sm"><code>@EnableCreateCacheAnnotation
@EnableMethodCache(basePackages = "com.ts")
@SpringBootApplication
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}</code></pre>
                            </div>
                        </div>
                    </div>
                    <div class="mt-6">
                        <h4 class="font-bold text-gray-800 mb-3">使用缓存</h4>
                        <div class="highlight-code p-4 rounded-lg">
                            <pre class="text-sm"><code>@Service
public class ProductService {
    
    @Cached(name = "product:", key = "#productId", expire = 7200)
    public Product getProductById(Long productId) {
        return productRepository.findById(productId);
    }
    
    @CacheUpdate(name = "product:", key = "#product.id", value = "#product")
    public Product updateProduct(Product product) {
        return productRepository.save(product);
    }
}</code></pre>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Subsection 4.2 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">2</span>
                    电商系统缓存优化实践
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                    <p class="text-gray-700 mb-6">在电商系统中，商品信息、用户信息、订单信息等都是高频访问的数据，非常适合使用缓存优化：</p>
                    <div class="highlight-code p-4 rounded-lg">
                        <pre class="text-sm"><code>@Service
public class OrderService {
    
    // 缓存订单信息
    @Cached(name = "order:", key = "#orderId", expire = 1800)
    public Order getOrderById(Long orderId) {
        return orderRepository.findById(orderId);
    }
    
    // 缓存用户订单列表
    @Cached(name = "userOrders:", key = "#userId", expire = 900)
    public List&lt;Order&gt; getUserOrders(Long userId) {
        return orderRepository.findByUserId(userId);
    }
    
    // 创建订单时更新缓存
    @CacheUpdate(name = "userOrders:", key = "#order.userId")
    public Order createOrder(Order order) {
        Order savedOrder = orderRepository.save(order);
        // 更新用户订单列表缓存
        return savedOrder;
    }
}</code></pre>
                    </div>
                    <div class="mt-6 grid grid-cols-1 md:grid-cols-3 gap-4">
                        <div class="bg-blue-50 p-4 rounded-lg">
                            <h4 class="font-bold text-blue-800 mb-2">订单详情缓存</h4>
                            <p class="text-sm text-gray-700">单条订单信息缓存30分钟，适合订单查询场景。</p>
                        </div>
                        <div class="bg-green-50 p-4 rounded-lg">
                            <h4 class="font-bold text-green-800 mb-2">用户订单列表</h4>
                            <p class="text-sm text-gray-700">用户所有订单缓存15分钟，适合个人中心展示。</p>
                        </div>
                        <div class="bg-purple-50 p-4 rounded-lg">
                            <h4 class="font-bold text-purple-800 mb-2">缓存更新策略</h4>
                            <p class="text-sm text-gray-700">创建订单时自动更新用户订单列表缓存，保持数据一致性。</p>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Subsection 4.3 -->
            <div>
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">3</span>
                    高并发场景下的性能测试
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                    <div class="highlight-code p-4 rounded-lg mb-6">
                        <pre class="text-sm"><code>@RestController
public class PerformanceTestController {
    
    @Autowired
    private ProductService productService;
    
    @GetMapping("/test/performance")
    public String testPerformance() {
        long startTime = System.currentTimeMillis();
        
        // 模拟1000个并发请求
        for (int i = 0; i &lt; 1000; i++) {
            productService.getProductById((long) (i % 100));
        }
        
        long endTime = System.currentTimeMillis();
        return "执行时间: " + (endTime - startTime) + "ms";
    }
}</code></pre>
                    </div>
                    <div class="bg-green-50 rounded-lg p-6">
                        <div class="flex items-center">
                            <div class="bg-green-100 p-3 rounded-full mr-4">
                                <i class="fas fa-chart-line text-green-600 text-xl"></i>
                            </div>
                            <div>
                                <h4 class="font-bold text-green-800 mb-1">性能测试结果</h4>
                                <p class="text-gray-700">测试结果显示，使用JetCache后，接口响应时间从原来的500ms降低到50ms，性能提升了10倍。</p>
                            </div>
                        </div>
                        <div class="mt-4">
                            <div class="h-4 bg-gray-200 rounded-full overflow-hidden">
                                <div class="h-full bg-green-500 rounded-full" style="width: 10%"></div>
                            </div>
                            <div class="flex justify-between text-xs text-gray-600 mt-1">
                                <span>无缓存: 500ms</span>
                                <span>JetCache: 50ms</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Section 5 -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="h-0.5 bg-blue-500 w-16 mr-4"></div>
                <h2 class="text-3xl font-bold text-gray-800">五、高级特性</h2>
            </div>

            <!-- Subsection 5.1 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">1</span>
                    多级缓存策略
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                    <div class="highlight-code p-4 rounded-lg mb-6">
                        <pre class="text-sm"><code>@Cached(name = "product:", key = "#productId", 
        localExpire = 1800, expire = 7200, cacheType = CacheType.BOTH)
public Product getProductById(Long productId) {
    return productRepository.findById(productId);
}</code></pre>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                        <div>
                            <h4 class="font-bold text-gray-800 mb-3">多级缓存原理</h4>
                            <div class="mermaid">
                                sequenceDiagram
                                    participant Client
                                    participant LocalCache
                                    participant RemoteCache
                                    participant Database
                                    
                                    Client->>LocalCache: 查询数据
                                    alt 本地缓存命中
                                        LocalCache-->>Client: 返回数据
                                    else 本地缓存未命中
                                        LocalCache->>RemoteCache: 查询数据
                                        alt 远程缓存命中
                                            RemoteCache-->>LocalCache: 返回数据
                                            LocalCache-->>Client: 返回数据
                                        else 远程缓存未命中
                                            RemoteCache->>Database: 查询数据
                                            Database-->>RemoteCache: 返回数据
                                            RemoteCache-->>LocalCache: 返回数据
                                            LocalCache-->>Client: 返回数据
                                        end
                                    end
                            </div>
                        </div>
                        <div>
                            <h4 class="font-bold text-gray-800 mb-3">多级缓存优势</h4>
                            <ul class="list-disc pl-5 text-gray-700 space-y-2">
                                <li><span class="font-medium">性能优化:</span> 本地缓存提供极速响应，远程缓存提供共享存储</li>
                                <li><span class="font-medium">命中率提升:</span> 多层次缓存提高了整体命中率</li>
                                <li><span class="font-medium">成本控制:</span> 减少对远程缓存的访问，降低网络开销</li>
                                <li><span class="font-medium">弹性设计:</span> 当远程缓存不可用时，本地缓存仍可提供服务</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Subsection 5.2 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">2</span>
                    缓存监控与运维
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                    <div class="highlight-code p-4 rounded-lg mb-6">
                        <pre class="text-sm"><code>@Component
public class CacheMonitor {
    
    @Autowired
    private CacheManager cacheManager;
    
    @Scheduled(fixedRate = 60000) // 每分钟执行一次
    public void monitorCache() {
        // 获取缓存统计信息
        CacheStats stats = cacheManager.getCache("product:").getStats();
        
        System.out.println("缓存命中率: " + stats.getHitRate());
        System.out.println("缓存访问次数: " + stats.getRequestCount());
        System.out.println("缓存命中次数: " + stats.getHitCount());
        System.out.println("缓存未命中次数: " + stats.getMissCount());
    }
}</code></pre>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                        <div>
                            <h4 class="font-bold text-gray-800 mb-3">监控指标说明</h4>
                            <ul class="list-disc pl-5 text-gray-700 space-y-2">
                                <li><span class="font-medium">命中率:</span> 缓存命中次数与总请求次数的比率</li>
                                <li><span class="font-medium">请求次数:</span> 缓存被访问的总次数</li>
                                <li><span class="font-medium">命中次数:</span> 从缓存中直接获取数据的次数</li>
                                <li><span class="font-medium">未命中次数:</span> 需要查询数据源的次数</li>
                            </ul>
                        </div>
                        <div>
                            <h4 class="font-bold text-gray-800 mb-3">运维建议</h4>
                            <ul class="list-disc pl-5 text-gray-700 space-y-2">
                                <li>定期检查缓存命中率，低于80%可能需要优化缓存策略</li>
                                <li>监控缓存大小，避免内存溢出</li>
                                <li>设置合理的缓存过期时间，平衡数据新鲜度和性能</li>
                                <li>对于热点数据，考虑使用多级缓存策略</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Subsection 5.3 -->
            <div>
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">3</span>
                    常见问题排查与解决
                </h3>
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="grid grid-cols-1 md:grid-cols-3 divide-x divide-gray-200">
                        <div class="p-6">
                            <h4 class="font-bold text-gray-800 mb-3 flex items-center">
                                <i class="fas fa-exclamation-triangle text-yellow-500 mr-2"></i>
                                缓存数据不一致
                            </h4>
                            <p class="text-gray-700 mb-4">现象：数据库数据已更新，但缓存中仍是旧数据。</p>
                            <div class="bg-yellow-50 p-3 rounded-lg">
                                <p class="text-sm font-medium text-yellow-800">解决方案：</p>
                                <ul class="list-disc pl-5 text-sm text-gray-700 mt-1">
                                    <li>使用`@CacheUpdate`注解确保缓存与数据库同步</li>
                                    <li>使用`@CacheInvalidate`注解在数据更新后删除缓存</li>
                                    <li>设置合理的缓存过期时间</li>
                                </ul>
                            </div>
                        </div>
                        <div class="p-6">
                            <h4 class="font-bold text-gray-800 mb-3 flex items-center">
                                <i class="fas fa-memory text-red-500 mr-2"></i>
                                内存占用过高
                            </h4>
                            <p class="text-gray-700 mb-4">现象：应用内存持续增长，可能发生OOM。</p>
                            <div class="bg-red-50 p-3 rounded-lg">
                                <p class="text-sm font-medium text-red-800">解决方案：</p>
                                <ul class="list-disc pl-5 text-sm text-gray-700 mt-1">
                                    <li>合理设置本地缓存的容量限制</li>
                                    <li>设置合理的过期时间</li>
                                    <li>避免缓存大对象</li>
                                    <li>定期清理不常用的缓存</li>
                                </ul>
                            </div>
                        </div>
                        <div class="p-6">
                            <h4 class="font-bold text-gray-800 mb-3 flex items-center">
                                <i class="fas fa-database text-blue-500 mr-2"></i>
                                缓存穿透
                            </h4>
                            <p class="text-gray-700 mb-4">现象：大量请求查询不存在的数据，导致数据库压力过大。</p>
                            <div class="bg-blue-50 p-3 rounded-lg">
                                <p class="text-sm font-medium text-blue-800">解决方案：</p>
                                <ul class="list-disc pl-5 text-sm text-gray-700 mt-1">
                                    <li>使用`cacheNullValue = true`参数</li>
                                    <li>对不存在的键也进行缓存</li>
                                    <li>添加布隆过滤器拦截非法请求</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Section 6 -->
        <section>
            <div class="flex items-center mb-8">
                <div class="h-0.5 bg-blue-500 w-16 mr-4"></div>
                <h2 class="text-3xl font-bold text-gray-800">六、性能优化与调优</h2>
            </div>

            <!-- Subsection 6.1 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">1</span>
                    缓存命中率优化
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                    <div class="highlight-code p-4 rounded-lg mb-6">
                        <pre class="text-sm"><code>// 使用更精确的缓存键
@Cached(name = "product:", key = "#productId + ':' + #version", expire = 7200)
public Product getProductById(Long productId, String version) {
    return productRepository.findByIdAndVersion(productId, version);
}

// 使用批量查询减少缓存访问次数
@Cached(name = "products:", key = "#productIds", expire = 3600)
public List&lt;Product&gt; getProductsByIds(List&lt;Long&gt; productIds) {
    return productRepository.findByIdIn(productIds);
}</code></pre>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                        <div>
                            <h4 class="font-bold text-gray-800 mb-3">优化策略</h4>
                            <ul class="list-disc pl-5 text-gray-700 space-y-2">
                                <li><span class="font-medium">精细化缓存键:</span> 包含更多维度信息，减少缓存冲突</li>
                                <li><span class="font-medium">批量操作:</span> 减少缓存访问次数，提高效率</li>
                                <li><span class="font-medium">热点数据预热:</span> 系统启动时加载热点数据到缓存</li>
                                <li><span class="font-medium">缓存分区:</span> 根据业务特点划分缓存区域</li>
                            </ul>
                        </div>
                        <div>
                            <div class="bg-blue-50 p-4 rounded-lg">
                                <h4 class="font-bold text-blue-800 mb-2">命中率指标</h4>
                                <div class="flex items-center justify-between mb-2">
                                    <span class="text-sm text-gray-700">优秀</span>
                                    <span class="text-sm font-medium text-blue-700">>90%</span>
                                </div>
                                <div class="h-2 bg-gray-200 rounded-full overflow-hidden mb-2">
                                    <div class="h-full bg-green-500 rounded-full" style="width: 95%"></div>
                                </div>
                                <div class="flex items-center justify-between mb-2">
                                    <span class="text-sm text-gray-700">良好</span>
                                    <span class="text-sm font-medium text-blue-700">80%-90%</span>
                                </div>
                                <div class="h-2 bg-gray-200 rounded-full overflow-hidden mb-2">
                                    <div class="h-full bg-blue-500 rounded-full" style="width: 85%"></div>
                                </div>
                                <div class="flex items-center justify-between">
                                    <span class="text-sm text-gray-700">需优化</span>
                                    <span class="text-sm font-medium text-blue-700">&lt;80%</span>
                                </div>
                                <div class="h-2 bg-gray-200 rounded-full overflow-hidden">
                                    <div class="h-full bg-yellow-500 rounded-full" style="width: 70%"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Subsection 6.2 -->
            <div class="mb-12">
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">2</span>
                    内存使用优化
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                    <div class="highlight-code p-4 rounded-lg mb-6">
                        <pre class="text-sm"><code>jetcache:
  local:
    default:
      type: caffeine
      limit: 1000  # 限制缓存条目数量
      expireAfterWriteInMillis: 1800000  # 30分钟过期
      maximumSize: 100MB  # 限制内存使用</code></pre>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                        <div class="bg-blue-50 p-4 rounded-lg">
                            <h4 class="font-bold text-blue-800 mb-2">条目数量限制</h4>
                            <p class="text-sm text-gray-700">通过`limit`参数控制缓存中最大条目数，避免无限增长。</p>
                        </div>
                        <div class="bg-green-50 p-4 rounded-lg">
                            <h4 class="font-bold text-green-800 mb-2">内存大小限制</h4>
                            <p class="text-sm text-gray-700">通过`maximumSize`限制缓存使用的最大内存，单位可以是MB或GB。</p>
                        </div>
                        <div class="bg-purple-50 p-4 rounded-lg">
                            <h4 class="font-bold text-purple-800 mb-2">过期策略</h4>
                            <p class="text-sm text-gray-700">设置`expireAfterWrite`或`expireAfterAccess`控制缓存过期时间。</p>
                        </div>
                    </div>
                    <div class="mt-6 bg-yellow-50 p-4 rounded-lg">
                        <h4 class="font-bold text-yellow-800 mb-2 flex items-center">
                            <i class="fas fa-lightbulb mr-2"></i>
                            内存优化建议
                        </h4>
                        <ul class="list-disc pl-5 text-gray-700 space-y-1">
                            <li>避免缓存大对象，考虑只缓存必要字段</li>
                            <li>对于不常访问的数据，设置较短的过期时间</li>
                            <li>定期监控缓存内存使用情况</li>
                            <li>根据业务特点选择LRU或LFU等淘汰策略</li>
                        </ul>
                    </div>
                </div>
            </div>

            <!-- Subsection 6.3 -->
            <div>
                <h3 class="text-2xl font-semibold text-gray-800 mb-6 flex items-center">
                    <span class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3">3</span>
                    网络传输优化
                </h3>
                <div class="bg-white rounded-xl shadow-md p-6 card-hover">
                    <div class="highlight-code p-4 rounded-lg mb-6">
                        <pre class="text-sm"><code>jetcache:
  remote:
    default:
      type: redis.lettuce
      # 启用压缩
      valueEncoder: java
      valueDecoder: java
      # 使用连接池
      poolConfig:
        minIdle: 10
        maxIdle: 50
        maxTotal: 100
      # 设置超时时间
      timeout: 3000</code></pre>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                        <div>
                            <h4 class="font-bold text-gray-800 mb-3">序列化优化</h4>
                            <ul class="list-disc pl-5 text-gray-700 space-y-2">
                                <li>选择合适的序列化方式（JSON、Java、Kryo等）</li>
                                <li>对于大对象，考虑启用压缩</li>
                                <li>避免序列化不必要的字段</li>
                            </ul>
                        </div>
                        <div>
                            <h4 class="font-bold text-gray-800 mb-3">连接池配置</h4>
                            <ul class="list-disc pl-5 text-gray-700 space-y-2">
                                <li>根据并发量设置合适的连接池大小</li>
                                <li>设置合理的连接超时时间</li>
                                <li>监控连接池使用情况</li>
                            </ul>
                        </div>
                        <div>
                            <h4 class="font-bold text-gray-800 mb-3">批量操作</h4>
                            <ul class="list-disc pl-5 text-gray-700 space-y-2">
                                <li>使用批量查询减少网络往返</li>
                                <li>考虑使用管道（pipeline）提高效率</li>
                                <li>对于频繁更新的数据，考虑本地合并后再写入远程</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>